#include<stdio.h>
int main()
{
	int i,a,sum=0,j;
	scanf("%d",&i);
	a=i+199;
	for(j=i;j<=a;j++)
	{
		if(j%2==0&&j%3==0)
		{
			printf("%d\n",j);
		    sum++;
		}
	}
	printf("sum is:%d",sum);
	return 0;
 } 
